package com.rw.test.restful;

import com.rw.test.restful.service.AsyncService;
import com.rw.test.vo.ResultVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/RWdaze/AsyncTestController")
public class AsyncTestController {
    @Resource
    private AsyncService asyncService;

    @GetMapping("/asyncTest")
    public ResultVO<?> asyncTest() {
        asyncService.bigTask();
        return new ResultVO<>(0, "done");
    }
}
